package com.green.system.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Green
 * @Date: 2021/10/18/9:08
 * @Description:
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultObj {

    public static final ResultObj IS_LOGIN = new ResultObj(200,"已登录");
    public static final ResultObj UN_LOGIN = new ResultObj(-1,"未登录");

    public static final ResultObj DELETE_SUCCESS = new ResultObj(200,"删除成功");
    public static final ResultObj DELETE_ERROR = new ResultObj(-1,"删除失败");

    public static final ResultObj ADD_SUCCESS = new ResultObj(200,"添加成功");
    public static final ResultObj ADD_ERROR = new ResultObj(-1,"添加失败");

    public static final ResultObj UPDATE_SUCCESS = new ResultObj(200,"更新成功");
    public static final ResultObj UPDATE_ERROR = new ResultObj(-1,"更新失败");

    public static final ResultObj DISPATCH_SUCCESS = new ResultObj(200,"分配成功");
    public static final ResultObj DISPATCH_ERROR = new ResultObj(-1,"分配失败");

    public static final ResultObj RESET_SUCCESS = new ResultObj(200, "重置密码成功");
    public static final ResultObj RESET_ERROR = new ResultObj(-1, "重置密码失败");

    public static final ResultObj AVAILABLE_NOT_IN = new ResultObj(200,"该商品未上架");
    public static final ResultObj AVAILABLE_IN = new ResultObj(-1,"该商品已上架");

    public static final ResultObj DOWN_SUCCESS = new ResultObj(200,"下架成功");
    public static final ResultObj DOWN_ERROR = new ResultObj(-1,"下架失败");

    public static final ResultObj SCRAP_SUCCESS = new ResultObj(200,"报废成功");
    public static final ResultObj SCRAP_ERROR = new ResultObj(-1,"报废失败");

    public static final ResultObj SALESBACK_SUCCESS = new ResultObj(200,"退货成功");
    public static final ResultObj SALESBACK_ERROR = new ResultObj(-1,"退货失败");


    private Integer code = 200 ;
    private String msg="";
    private Object token="";

    public ResultObj(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
